package com.xueshishasha.oa.common.utils;

import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

/**
 * @author xueshishasha
 *
 */
public class CreateDB {

	public static void main(String[] args){
		Configuration cfg=new Configuration().configure();
		
		SchemaExport se=new SchemaExport(cfg);
		/*
		 * create(boolean script, boolean export)
		 * 		script=true: print the DDL to the console
		 * 		export=true: export the script to the database
		 */
		se.create(true, true);
		
	}
}
